package com.info.zhiduoduo.repository.mapper.system;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.entity.system.TaxSource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

/**
 * @author tianyonghong
 * @create 2022/3/24
 */
@Mapper
public interface TaxSourceMapper extends BaseMapper<TaxSource> {

    @Select("select IFNULL(SUM(tax_source_cost_rate),0) from zdd_tax_source where tax_source_id = #{taxSourceId}")
    BigDecimal getRateByTaxSourceId(Integer taxSourceId);
}
